package com.dubbo.xml.consume;

import com.dubbo.xml.api.IHelloDubboService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class Application {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
        context.start();
        IHelloDubboService serviceImpl = (IHelloDubboService) context.getBean("HelloDubboServiceImpl");
        String message = serviceImpl.Hello("dubbo");
        System.out.println("Receive result ======> " + message);
        System.in.read();
        System.exit(0);
    }
}
